package com.ar4j.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Defines the behavior of a dynamic method (findBy, findAllBy, countBy, etc.) on an ActiveRecord 
 */
@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DynamicMethod {

  /**
   * @return property names of the parameters defined in the method arguments
   */
  String[] value() default { };
  
  /**
   * @return default parameter name/value pairs to be used
   */
  DefaultParameter[] defaultParameters() default { };
  
}
